package com.bn.commerce.pricing;

import atg.commerce.pricing.PricingTools;
import atg.repository.RepositoryException;
import atg.repository.RepositoryItem;

public class BNPricingTools extends PricingTools{

         @Override
        public boolean isDiscountableItem(RepositoryItem arg0, RepositoryItem arg1)
        		throws RepositoryException {
        	System.out.println("isDiscount");
        	boolean isDiscountable = false;
        	isDiscountable = (Boolean)arg0.getPropertyValue("isDiscoutable");
			  System.out.println("isDiscountable"+isDiscountable);
			  if(isDiscountable){
				  isDiscountable= super.isDiscountableItem(arg0, arg1);
			  }
			  else{
				  if(isLoggingDebug()){
					  logDebug("Discount cannot be apply for this product");
				  }
			  }
        	return isDiscountable;
        }
}
